#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QTimer>
#include <opencv2/opencv.hpp>
#include <opencv2/highgui/highgui_c.h>

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    void ShowImage(cv::Mat& mat);
    QImage MatToQImage2(const cv::Mat &mat);
    ~MainWindow();



private slots:
    //void on_pushButton_open_clicked();

    void on_pushButton_play_clicked();

    void ReadFrame();

    void on_pushButton_pause_clicked();


private:
    Ui::MainWindow *ui;


    cv::VideoCapture video;
    QTimer *timer;

    int fps;
    QString videofileName;
    std::string sfileName;

};
#endif // MAINWINDOW_H
